<template>
  <div class="component-mainHeader">
    <div class="top">
      <div class="topleft">
        <p><span class="iconfont" style="color:#1abc9a;margin-right:3px;">&#xe607;</span>{{title}}</p>
      </div>
      <div class="topright">
        <el-button type="info" @click="$router.go(0)">
          <span style="font-weight:700;margin-right:5px;" class="iconfont">&#xe662;</span>刷新
        </el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "mainHeader",
  data() {
    return {
      title: "合同列表"
    };
  }
  //   父组件引入此组件后通过在子组件上设置自定义属性title来显示左上角标题，设置自定义属性refresh的bool值来控制刷新按钮是否显示
  //   props:[
  //       title,
  //       refresh
  //   ]
};
</script>

<style>
.component-mainHeader {
  height: 50px;
  background-color: #f3f3f3;
  width: 100%;
  border: 1px solid #e4e4e4;
  box-sizing: border-box;
}

.component-mainHeader .top {
  width: 1100px;
  margin: 0 auto;
}

.component-mainHeader .top .topleft {
  float: left;
  display: flex;
}

.component-mainHeader .top .topleft p {
  font-size: 14px;
  color: #999;
  margin: 13px 0;
}
.component-mainHeader .top .topright {
  float: right;
  font-size: 14px;
}

.component-mainHeader .top .topright .el-button {
  padding: 0 15px;
  height: 30px;
  margin: 10px 5px;
  line-height: 30px;
  font-size: 14px;
  color: #666;
  background-color: #fff;
  border: 1px solid #ccc;
}

.component-mainHeader .top .topright .el-button:hover {
  background-color: #f3f3f3;
}

.component-mainHeader .top .topright {
  font-size: 24px;
}
</style>